package com.niiwoo.civet.trade.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 还款计划中还款状态
 * 
 * @author liaojunjun
 *
 */
@AllArgsConstructor
@Getter
public enum BorrowerPlanRefundStatusEnum {
	NON_REPAYMENT((byte) 1, "未还款"),

	NORMAL_REPAYMENT((byte) 2, "已正常还款"),

	OVERDUE_REPAYMENT((byte) 3, "已逾期还款"),

	OVER_DEBT_REPAYMENT((byte)4, "已提前结清");

	/**
	 * 还款状态
	 */
	private Byte code;

	private String desc;

	public static BorrowerPlanRefundStatusEnum enumOf(int code) {
		for (BorrowerPlanRefundStatusEnum repayStatus : values()) {
			if (repayStatus.code == code) {
				return repayStatus;
			}
		}
		return null;
	}

}
